home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_6C2A6789894741EC875E87C84450CC48
< prev
next >
Wrap
Text File
|
2005-03-01
|
568b
|
30 lines
//combine color and texture sample
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//texture sampler
sampler2D sampTex;
//shader input
struct PS_INPUT
{
float4 Color : COLOR;
float2 Tex0 : TEXCOORD0;
};
//shader code
float4 PShader(PS_INPUT In) : COLOR
{
//sample textutes
float4 texclr=tex2D(sampTex,In.Tex0);
//knock out alpha so it will be alpha tested away if below a certain level
if (texclr.a<0.5f) texclr.a=0;
//blend with vert color
float4 clr=texclr*In.Color;
//spit out color
return clr;
}